package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.Enterprise;
import com.antdesignbackend.backend.entity.entityVo.EnterpriseVo;
import com.antdesignbackend.backend.mapper.EnterpriseMapper;
import com.antdesignbackend.backend.service.EnterpriseService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper, Enterprise> implements EnterpriseService {

    @Autowired
    EnterpriseMapper enterpriseMapper;

    @Override
    public List<EnterpriseVo> search(QueryWrapper<EnterpriseVo> queryWrapper, Page<EnterpriseVo> page) {
        return enterpriseMapper.search(queryWrapper,page);
    }

    @Override
    public Integer count(QueryWrapper<EnterpriseVo> queryWrapper) {
        return enterpriseMapper.count(queryWrapper);
    }
}
